package com.jinyu.jyly.adapter;

import java.util.ArrayList;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

public class ViewPagerFragmentAdapter extends FragmentPagerAdapter {

    ArrayList<Fragment> mFragment;

    public ViewPagerFragmentAdapter(FragmentManager fm,
                                    ArrayList<Fragment> mFragment) {
        super(fm);
        this.mFragment = mFragment;
    }

    @Override
    public Fragment getItem(int arg0) {
        return mFragment.get(arg0);
    }

    @Override
    public int getCount() {
        return mFragment.size();
    }
    @Override
    public int getItemPosition(Object object) {
        return super.getItemPosition(object);
    }
}
